import request from '@/utils/request'
import { getToken } from '@/utils/auth'
export function getCourseList(){
    return request({
        url:"/api/course/list",
        method:"get",
        headers:{
            'Satoken': getToken()
        }
    })
}

// 通过课程id获取课程信息
export function getCourseInfo(courseId){
    return request({
        url:"/api/course?courseId=" + courseId,
        method:"get",
        headers:{
            'Satoken': getToken()
        }
    })
}

// 退出课程
export function exit(courseId){
    return request({
        url:"/api/course/exit?courseId=" + courseId,
        method:"get",
        headers:{
            'Satoken': getToken()
        }
    })
}
